package test3;

import java.util.ArrayList;
import java.util.List;

public class Instructor {
    private String name;
    private List<Subject> coursesTaught;

    public Instructor(String name) {
        this.name = name;
        coursesTaught = new ArrayList<>();
    }

    public void addCourseTaught(Subject subject) {
        coursesTaught.add(subject);
    }

    public String getName() {
        return name;
    }

    public List<Subject> getCoursesTaught() {
        return coursesTaught;
    }
}






